﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    //老师类
    class MusicTeacther
    {
        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        public MusicTeacther(string name)
        {
            this.Name = name;
        }
        public void Hello()
        {
            Console.WriteLine("我{0}，我是一名音乐老师", this.name);
        }
    }
    class Althele
    {
        public void yun()
        {
            Console.WriteLine("我是一名运动员");
        }
    }
    class Teather : MusicTeacther, ITeacther
    {
        public Teather(string name) : base(name)
        {
        }
        public void yun()
        {
            Console.WriteLine("我还是一名运动员");
        }
    }
    //员工类
    class Programmar
    {
        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        public Programmar(string name)
        {
            this.Name = name;
        }
        public void Hello1()
        {
            Console.WriteLine("我{0}，我是一名程序员", this.name);
        }
    }
    class Writer:Programmar
    {
        public Writer(string name) : base(name)
        {
        }
        public void writer()
        {
            Console.WriteLine("我是一名作家");
        }
    }
    class Employe: Programmar, IProgrommar
    {
        public Employe(string name) : base(name) { }

        public void writer()
        {
            Console.WriteLine("我还是一位作家");
        }
    }
}
